<?php

global $_RQ,$_AR;
$_RQ['op']=$_RQ['op']?$_RQ['op']:'edit';
$return=array();
if($_RQ['op']=='edit'){
	$item=$this->plugin_setting('saleset');
    $return['item']=$item;
	$htmls=array(
		'type'=>'edit',
		'post'=>'post',
		'desc'=>'满额立减设置',
		'edit'=>array(
				array('type'=>'array','name'=>'enough','add_tip'=>'添加一个优惠项',
					'list'=>array(
						array('type'=>'string','name'=>'man','title'=>'满'),	
						array('type'=>'string','name'=>'jian','title'=>'减'),	
					),
					'details'=>array(
						array('type'=>'string','name'=>'man','title'=>'满'),	
						array('type'=>'string','name'=>'jian','title'=>'减'),
					)
				),	
			),
			);
	$return['htmls']=$htmls;
	exi($return);
}
if($_RQ['op']=='post'){
	$post=get_postdata();
	$this->plugin_setting('saleset',$post);
	exi('设置成功');
}
?>